/*
{
"状态":1,
"名称":"新增-季节资料",
"作者":"陈泽椿",
"创建时间":"2018-06-30",
"功能":"新增-季节资料",
"log": [
	{"date":"06-01" , "dev" :"hzhh" , "content" : ""}
]
}
*/
declare @season_code varchar(100) , @season_name varchar(100) , @remarks varchar(100)
set @season_code = '{season_code}'
set @season_name ='{season_name}' 
set @remarks = '{remarks}'


--校验信息
if isnull(@season_code,'')=''
begin 
	RAISERROR ('SQL:季节编号不允许为空', 16 ,1 ) ; 
	return 
end 


if isnull(@season_name,'')=''
begin 
	RAISERROR ('SQL:季节名称不允许为空', 16 ,1 ) ; 
	return 
end 


if EXISTS(SELECT * FROM b_season WHERE [season_code]=@season_code )
begin
	RAISERROR ('SQL:季节编号已经存在', 16 ,1 ) ; 
	return 
end



INSERT INTO [dbo].[b_season]([season_code],[season_name],[remarks],[create_time],[create_user],[update_time],[update_user])
VALUES( @season_code  , @season_name , @remarks , getdate(), 0 , getdate() , 0 )

